//
// Created by nicemoe on 2021/8/11.
//

#include  <iostream>

using namespace std;

template<typename T>
void Swap(T &a, T &b);

int main() {

    int a = 10, b = 20;
    Swap(a, b);
    cout << a << " " << b << endl;

    double m = 21.1, n = 31.1;
    Swap(m,n);
    cout << m << " " << n << endl;
    return 0;
}

template<typename T>
void Swap(T &a, T &b) {
    T temp = a;
    a = b;
    b = temp;
}